3.1.18 \(\int (a+b \tanh ^{-1}(c x))^2 \, dx\) [18]

Optimal. Leaf size=74 \[ \frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c}+x \left (a+b \tanh ^{-1}(c x)\right )^2-\frac {2 b \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c}-\frac {b^2 \text {PolyLog}\left (2,1-\frac {2}{1-c x}\right )}{c} \]

[Out]

(a+b*arctanh(c*x))^2/c+x*(a+b*arctanh(c*x))^2-2*b*(a+b*arctanh(c*x))*ln(2/(-c*x+1))/c-b^2*polylog(2,1-2/(-c*x+
1))/c

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {6021, 6131, 6055, 2449, 2352} \begin {gather*} x \left (a+b \tanh ^{-1}(c x)\right )^2+\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c}-\frac {2 b \log \left (\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c}-\frac {b^2 \text {Li}_2\left (1-\frac {2}{1-c x}\right )}{c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTanh[c*x])^2,x]

[Out]

(a + b*ArcTanh[c*x])^2/c + x*(a + b*ArcTanh[c*x])^2 - (2*b*(a + b*ArcTanh[c*x])*Log[2/(1 - c*x)])/c - (b^2*Pol
yLog[2, 1 - 2/(1 - c*x)])/c

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2449

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> Dist[-e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 6021

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTanh[c*x^n])^p, x] - Dist[b
*c*n*p, Int[x^n*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))), x], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p
, 0] && (EqQ[n, 1] || EqQ[p, 1])

Rule 6055

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-(a + b*ArcTanh[c*x])^p)
*(Log[2/(1 + e*(x/d))]/e), x] + Dist[b*c*(p/e), Int[(a + b*ArcTanh[c*x])^(p - 1)*(Log[2/(1 + e*(x/d))]/(1 - c^
2*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 - e^2, 0]

Rule 6131

Int[(((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTanh[c
*x])^(p + 1)/(b*e*(p + 1)), x] + Dist[1/(c*d), Int[(a + b*ArcTanh[c*x])^p/(1 - c*x), x], x] /; FreeQ[{a, b, c,
 d, e}, x] && EqQ[c^2*d + e, 0] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int \left (a+b \tanh ^{-1}(c x)\right )^2 \, dx &=x \left (a+b \tanh ^{-1}(c x)\right )^2-(2 b c) \int \frac {x \left (a+b \tanh ^{-1}(c x)\right )}{1-c^2 x^2} \, dx\\ &=\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c}+x \left (a+b \tanh ^{-1}(c x)\right )^2-(2 b) \int \frac {a+b \tanh ^{-1}(c x)}{1-c x} \, dx\\ &=\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c}+x \left (a+b \tanh ^{-1}(c x)\right )^2-\frac {2 b \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c}+\left (2 b^2\right ) \int \frac {\log \left (\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx\\ &=\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c}+x \left (a+b \tanh ^{-1}(c x)\right )^2-\frac {2 b \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c}-\frac {\left (2 b^2\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-c x}\right )}{c}\\ &=\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{c}+x \left (a+b \tanh ^{-1}(c x)\right )^2-\frac {2 b \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c}-\frac {b^2 \text {Li}_2\left (1-\frac {2}{1-c x}\right )}{c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.10, size = 82, normalized size = 1.11 \begin {gather*} \frac {b^2 (-1+c x) \tanh ^{-1}(c x)^2+2 b \tanh ^{-1}(c x) \left (a c x-b \log \left (1+e^{-2 \tanh ^{-1}(c x)}\right )\right )+a \left (a c x+b \log \left (1-c^2 x^2\right )\right )+b^2 \text {PolyLog}\left (2,-e^{-2 \tanh ^{-1}(c x)}\right )}{c} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTanh[c*x])^2,x]

[Out]

(b^2*(-1 + c*x)*ArcTanh[c*x]^2 + 2*b*ArcTanh[c*x]*(a*c*x - b*Log[1 + E^(-2*ArcTanh[c*x])]) + a*(a*c*x + b*Log[
1 - c^2*x^2]) + b^2*PolyLog[2, -E^(-2*ArcTanh[c*x])])/c

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 118, normalized size = 1.59

method result size
derivativedivides \(\frac {c x \,a^{2}+b^{2} c x \arctanh \left (c x \right )^{2}+b^{2} \arctanh \left (c x \right )^{2}-2 \arctanh \left (c x \right ) \ln \left (1+\frac {\left (c x +1\right )^{2}}{-c^{2} x^{2}+1}\right ) b^{2}-\polylog \left (2, -\frac {\left (c x +1\right )^{2}}{-c^{2} x^{2}+1}\right ) b^{2}+2 a b c x \arctanh \left (c x \right )+a b \ln \left (-c^{2} x^{2}+1\right )}{c}\) \(118\)
default \(\frac {c x \,a^{2}+b^{2} c x \arctanh \left (c x \right )^{2}+b^{2} \arctanh \left (c x \right )^{2}-2 \arctanh \left (c x \right ) \ln \left (1+\frac {\left (c x +1\right )^{2}}{-c^{2} x^{2}+1}\right ) b^{2}-\polylog \left (2, -\frac {\left (c x +1\right )^{2}}{-c^{2} x^{2}+1}\right ) b^{2}+2 a b c x \arctanh \left (c x \right )+a b \ln \left (-c^{2} x^{2}+1\right )}{c}\) \(118\)
risch \(-\frac {a^{2}}{c}-\frac {b^{2}}{c}+a^{2} x -\frac {b^{2} \dilog \left (\frac {c x}{2}+\frac {1}{2}\right )}{c}-\frac {b^{2} \ln \left (c x -1\right )}{c}+\frac {b^{2} \ln \left (c x +1\right )^{2} x}{4}+\frac {b^{2} \ln \left (c x +1\right )^{2}}{4 c}-\frac {2 a b}{c}+\frac {\ln \left (-c x +1\right )^{2} x \,b^{2}}{4}-\frac {\ln \left (-c x +1\right )^{2} b^{2}}{4 c}+\frac {\ln \left (-c x +1\right ) b^{2}}{c}+b a \ln \left (c x +1\right ) x +\frac {b a \ln \left (c x +1\right )}{c}-\frac {b^{2} \ln \left (-c x +1\right ) \ln \left (c x +1\right ) x}{2}-\frac {b^{2} \ln \left (-c x +1\right ) \ln \left (c x +1\right )}{2 c}+\frac {b^{2} \ln \left (-\frac {c x}{2}+\frac {1}{2}\right ) \ln \left (c x +1\right )}{c}-\frac {b^{2} \ln \left (-\frac {c x}{2}+\frac {1}{2}\right ) \ln \left (\frac {c x}{2}+\frac {1}{2}\right )}{c}-\ln \left (-c x +1\right ) x a b +\frac {\ln \left (-c x +1\right ) a b}{c}\) \(264\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctanh(c*x))^2,x,method=_RETURNVERBOSE)

[Out]

1/c*(c*x*a^2+b^2*c*x*arctanh(c*x)^2+b^2*arctanh(c*x)^2-2*arctanh(c*x)*ln(1+(c*x+1)^2/(-c^2*x^2+1))*b^2-polylog
(2,-(c*x+1)^2/(-c^2*x^2+1))*b^2+2*a*b*c*x*arctanh(c*x)+a*b*ln(-c^2*x^2+1))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2,x, algorithm="maxima")

[Out]

-1/4*(c^2*(2*x/c^2 - log(c*x + 1)/c^3 + log(c*x - 1)/c^3) - 6*c*integrate(x*log(c*x + 1)/(c^2*x^2 - 1), x) - (
c*x - 1)*(log(-c*x + 1)^2 - 2*log(-c*x + 1) + 2)/c - (c*x*log(c*x + 1)^2 + 2*(c*x - (c*x + 1)*log(c*x + 1))*lo
g(-c*x + 1))/c + log(c^2*x^2 - 1)/c - 2*integrate(log(c*x + 1)/(c^2*x^2 - 1), x))*b^2 + a^2*x + (2*c*x*arctanh
(c*x) + log(-c^2*x^2 + 1))*a*b/c

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2,x, algorithm="fricas")

[Out]

integral(b^2*arctanh(c*x)^2 + 2*a*b*arctanh(c*x) + a^2, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \operatorname {atanh}{\left (c x \right )}\right )^{2}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atanh(c*x))**2,x)

[Out]

Integral((a + b*atanh(c*x))**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))^2,x, algorithm="giac")

[Out]

integrate((b*arctanh(c*x) + a)^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (a+b\,\mathrm {atanh}\left (c\,x\right )\right )}^2 \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atanh(c*x))^2,x)

[Out]

int((a + b*atanh(c*x))^2, x)

________________________________________________________________________________________